package com.gitee.wsl.struct.attribute.pairs


internal class Node(private val nodeId: String) {
    var counter = 0
        private set
    private val inboundItemIds: MutableSet<String> = HashSet()
    private val outboundItemIds: MutableSet<String> = HashSet()

    override fun toString(): String {
        return nodeId
    }

    fun increaseCounter() {
        counter++
    }

    val inboundItemIdsSize: Int
        get() = inboundItemIds.size
    val outboundItemIdsSize: Int
        get() = outboundItemIds.size

    fun addInboundItemIds(itemIds: Collection<String>) {
        inboundItemIds.addAll(itemIds)
    }

    fun addOutboundItemIds(itemIds: Collection<String>) {
        outboundItemIds.addAll(itemIds)
    }
}

